package com.cn.lycss.servlet;

import com.cn.lycss.model.CompanyModel;
import com.cn.lycss.model.NavModel;
import com.cn.lycss.service.CompanyService;
import com.cn.lycss.service.NavService;

import javax.servlet.http.HttpServletRequest;

public class CommonServlet {
    public static  void setCompanyAndNavDate(HttpServletRequest req){
        CompanyService companyService=new CompanyService();
        CompanyModel companyMode =companyService.getCompanyModel();
        req.getSession().setAttribute("companyModel",companyMode);


        NavService navService=new NavService();
        NavModel[] navModels=navService.getNavModel();

        req.setAttribute("navModels",navModels);
    }
}
